<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        /* 
            const修饰数组与对象
         */

         /* var obj = {name:"张三"}
         console.log(obj)
         console.log(obj.name)
         //重新赋值
         obj = {name:'李四'}
         console.log(obj.name)
         console.log(obj) */

         //申明一个不可变对象，指的是引用不可变，不是内容不可变
         const obj = {name:'张三'}
         console.log(obj)
         obj.name="哈哈"
         console.log(obj)
         obj = {name:'王五'}     //TypeError: Assignment to constant variable.
        //  console.log(obj)
    </script>
</head>
<body>
    
</body>
</html>